package com.zfh.servlet;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;

/**
 * @title:
 * @author: fhzheng
 * @date: 3/14/2021 12:58
 * @description:
 */

public class DemoServlet extends HttpServlet {

    @Override
    protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
        response.getWriter().write("<h1> Hello Servlet in IDEA demo </h1><br>");
        response.getWriter().write("<h1> Hello Servlet in IDEA demo </h1>");
        System.out.println("Call Servlet doGet");
    }

    @Override
    protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
        super.doPost(req, resp);
    }
}
